package com.example.xsssglxt.controller;

import com.example.xsssglxt.entity.Gly;
import com.example.xsssglxt.entity.Louyu;
import com.example.xsssglxt.mapper.GlyMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

@RestController
@Controller
@RequestMapping("/sush1")
public class GlyController {
    @Autowired
    private GlyMapper glyMapper;

    @GetMapping("/xl")
    public Map<String,Object> xl(){
        List<Gly> data=glyMapper.select();
        Map<String,Object> res=new HashMap<>();
        res.put("data",data);
        return res;
    }
}
